home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 2003 September / PC Answers September 2003.iso / Software / trial / AutoMate 5.0.4.1 / automate5_eval_setup.exe / Nested_Loops.aml < prev    next >
Encoding:
Text File  |  2002-05-12  |  1.1 KB  |  26 lines

  1. <AM5TASK>
  2. <AMTASKHEAD>
  3.     <TASKINFO TASKNAME="">
  4. <\AMTASKHEAD>
  5. <STEPS>
  6. <!---        Show message box telling the user what is going on --->
  7. <AMMESSAGEBOX WINDOWTITLE="Sample Task" BUTTONS="ok_cancel" ICON="information" ONSECONDBUTTONCLICK="stop">This sample task demonstrates the following:
  8. 1) Use of Nested Loops
  9. 2) Use of Expressions
  10.  
  11. There are 2 loops, one is embedded inside the other - each loop will execute 3 cycles.  For each loop the parent loop makes the nested loop will cycle 3 times.
  12. Remember you can always stop a task in progress by pressing CTRL-ALT-END. Press okay to continue running the task or Cancel to stop now.</AMMESSAGEBOX>
  13. <!--- Create counter variables --->
  14. <AMVARIABLE NAME="counter2"></AMVARIABLE>
  15. <AMVARIABLE NAME="counter1"></AMVARIABLE>
  16. <!--- Begin parent loop --->
  17. <AMLOOP FROM="1" TO="3" RESULTVARIABLE="counter1">
  18. <!--- Begin nested loop  --->
  19.           <AMLOOP FROM="1" TO="3" RESULTVARIABLE="counter2">
  20.                     <AMMESSAGEBOX>Parent loop is currently %counter1% of 3
  21. nested loop is currently %counter2% of 3</AMMESSAGEBOX>
  22.           </AMLOOP>
  23. </AMLOOP>
  24. <\STEPS>
  25. </AM5TASK>
  26.